package com.zwj.service.impl;

import com.zwj.dao.ByUser.ByUserMapper;
import com.zwj.pojo.User;
import com.zwj.service.ByUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ByUserServiceimpl implements ByUserService {
    @Resource
    private ByUserMapper byUserMapper;

    @Override
    public User logo(String userCode, String userPassword) throws Exception {
        User user = byUserMapper.selectCode(userCode);
        if ( null!=user ) {
            if (!user.getDevPassword().equals(userPassword)) {
                user = null;
            }
        }
        return user;
    }
}
